//
//  RequestLogoutApi.m
//  HHNMobileCore
//
//  Created by 余海华 on 16/4/26.
//  Copyright © 2016年 huhmf. All rights reserved.
//

#import "RequestLogoutApi.h"


@implementation RequestLogoutApi {
    
    NSString *_appVersion;
    NSString *_platform;
    NSString *_type;
}
-(instancetype) initRequestLogoutWithAppVerson:(NSString *) appVersion andPlatForm:(NSString *) platform andType:(NSString *)type{
    
    if(self = [super init]) {
        
        _appVersion = appVersion;
        _platform = platform;
        _type = type;
    }
    
    return self;
}

-(NSInteger)cacheTimeInSeconds
{
    return -60*1;//为负数 不启用缓存
}

-(id)requestArgument
{
    return @{
             @"appVersion": [_appVersion length]>0?_appVersion:@"",
             @"_platform": [_platform length]>0?_platform:@"",
             @"type": [_type length]>0?_type:@"-1"
             };
}


-(YTKRequestMethod)requestMethod
{
    return YTKRequestMethodPOST ;
}

-(NSString *)requestUrl
{
    return @"/login/loginout.do";
}

-(NSDictionary *)requestHeaderFieldValueDictionary
{
    NSMutableURLRequest *request_M=(NSMutableURLRequest *)[super requestTask].currentRequest;
    NSString *strUrl=[NSString stringWithFormat:@"%@%@",appBaseURL,[self requestUrl]];
    NSDictionary *dict=[[HHNUtility sharedHHNInstance] setHttpHeaderWithUrl:strUrl Request:request_M];
    
    return dict;
}

@end
